import request from '@/utils/request'
export default{
  //获取章节信息
  getAllChapterVideo(courseId){
    return request({
      url: `/edu-service/chapter/getChapterVideo/${courseId}`,
      method: 'get'
    })
  },

  //添加章节信息
  addChapterInfo(chapterInfo){
    return request({
      url: `/edu-service/chapter/add`,
      method: 'post',
      data: chapterInfo
    })
  },

  //获取章节信息
  getChapterInfo(id){
    return request({
      url: `/edu-service/chapter/getChapter/${id}`,
      method: 'get'
    })
  },

  //更新章节信息
  updateChapterInfo(chapterInfo){
    return request({
      url: `/edu-service/chapter/update`,
      method: 'post',
      data: chapterInfo
    })
  },

  //删除章节信息
  deleteChapter(id){
    return request({
      url: `/edu-service/chapter/delete/${id}`,
      method: 'delete'
    })
  }
}
